
/** mongodb_authmanager indexes **/
db.getCollection("mongodb_authmanager").ensureIndex({
  "_id": NumberInt(1)
},[
  
]);

/** system.users indexes **/
db.getCollection("system.users").ensureIndex({
  "_id": NumberInt(1)
},[
  
]);

/** tbl_customer indexes **/
db.getCollection("tbl_customer").ensureIndex({
  "_id": NumberInt(1)
},[
  
]);

/** tbl_location indexes **/
db.getCollection("tbl_location").ensureIndex({
  "_id": NumberInt(1)
},[
  
]);

/** tbl_member indexes **/
db.getCollection("tbl_member").ensureIndex({
  "_id": NumberInt(1)
},[
  
]);

/** tbl_store indexes **/
db.getCollection("tbl_store").ensureIndex({
  "_id": NumberInt(1)
},[
  
]);

/** tbl_subscriber indexes **/
db.getCollection("tbl_subscriber").ensureIndex({
  "_id": NumberInt(1)
},[
  
]);

/** mongodb_authmanager records **/
db.getCollection("mongodb_authmanager").insert({
  "_id": ObjectId("50f04f456803fa5e53000001"),
  "createPost": {
    "type": NumberInt(0),
    "description": "create a post",
    "bizRule": null,
    "data": null
  },
  "readPost": {
    "type": NumberInt(0),
    "description": "read a post",
    "bizRule": null,
    "data": null
  },
  "admin": {
    "type": NumberInt(2),
    "description": "",
    "bizRule": null,
    "data": null,
    "children": [
      "createPost"
    ]
  },
  "reader": {
    "type": NumberInt(2),
    "description": "",
    "bizRule": null,
    "data": null,
    "children": [
      "readPost"
    ]
  },
  "configId": "TestEnviroment"
});
db.getCollection("mongodb_authmanager").insert({
  "_id": ObjectId("50f04f456803fa5e53000000"),
  "admin": {
    "type": NumberInt(2),
    "description": "",
    "bizRule": null,
    "data": null,
    "children": [
      "createPost"
    ]
  },
  "configId": "default",
  "createPost": {
    "bizRule": 0,
    "data": null,
    "description": "create a post",
    "type": NumberInt(0)
  },
  "readPost": {
    "type": NumberInt(0),
    "description": "read a post",
    "bizRule": null,
    "data": null
  }
});

/** system.indexes records **/
db.getCollection("system.indexes").insert({
  "v": NumberInt(1),
  "key": {
    "_id": NumberInt(1)
  },
  "ns": "chotoday.system.users",
  "name": "_id_"
});
db.getCollection("system.indexes").insert({
  "v": NumberInt(1),
  "key": {
    "_id": NumberInt(1)
  },
  "ns": "chotoday.tbl_location",
  "name": "_id_"
});
db.getCollection("system.indexes").insert({
  "v": NumberInt(1),
  "key": {
    "_id": NumberInt(1)
  },
  "ns": "chotoday.tbl_member",
  "name": "_id_"
});
db.getCollection("system.indexes").insert({
  "v": NumberInt(1),
  "key": {
    "_id": NumberInt(1)
  },
  "ns": "chotoday.tbl_subscriber",
  "name": "_id_"
});
db.getCollection("system.indexes").insert({
  "v": NumberInt(1),
  "key": {
    "_id": NumberInt(1)
  },
  "ns": "chotoday.tbl_customer",
  "name": "_id_"
});
db.getCollection("system.indexes").insert({
  "v": NumberInt(1),
  "key": {
    "_id": NumberInt(1)
  },
  "ns": "chotoday.tbl_store",
  "name": "_id_"
});
db.getCollection("system.indexes").insert({
  "v": NumberInt(1),
  "key": {
    "_id": NumberInt(1)
  },
  "ns": "chotoday.mongodb_authmanager",
  "name": "_id_"
});

/** system.users records **/
db.getCollection("system.users").insert({
  "_id": ObjectId("50d10dbbbec6b1397024acd1"),
  "user": "admin",
  "readOnly": false,
  "pwd": "7c67ef13bbd4cae106d959320af3f704"
});

/** tbl_customer records **/
db.getCollection("tbl_customer").insert({
  "_id": ObjectId("50dc7f566803fa3548000002"),
  "full_name": "aaaa",
  "gender": "no",
  "birthday": false,
  "address": "asdsad asd asd",
  "location_id": "50dc6ccd6803fa1130000000",
  "mobile": "1111111",
  "landline": "",
  "member_id": "50dc7f566803fa3548000000"
});
db.getCollection("tbl_customer").insert({
  "_id": ObjectId("50dc80986803fa3548000007"),
  "full_name": "phu van nguyen",
  "gender": "no",
  "birthday": NumberInt(1355331600),
  "address": "111",
  "location_id": "50dc6ccd6803fa1130000000",
  "mobile": "1111111",
  "landline": "1111",
  "member_id": "50dc80986803fa3548000005"
});
db.getCollection("tbl_customer").insert({
  "_id": ObjectId("50dc80ba6803fa5746000004"),
  "full_name": "phu van nguyen",
  "gender": "no",
  "birthday": NumberInt(685299600),
  "address": "111",
  "location_id": "50dc6ccd6803fa1130000000",
  "mobile": "1111111",
  "landline": "1111",
  "member_id": "50dc80b96803fa5746000002"
});
db.getCollection("tbl_customer").insert({
  "_id": ObjectId("50dc816d6803fa784b000002"),
  "full_name": "Nguyễn phú",
  "gender": "male",
  "birthday": NumberInt(685299600),
  "address": "aaaaa",
  "location_id": "50dc6cce6803fa1130000002",
  "mobile": "1111111",
  "landline": "",
  "member_id": "50dc816d6803fa784b000000"
});
db.getCollection("tbl_customer").insert({
  "_id": ObjectId("50ddc9c76803fafc0b000002"),
  "full_name": "asasd",
  "gender": "no",
  "birthday": false,
  "address": "dasdasd",
  "location_id": "50dc6ccd6803fa1130000000",
  "mobile": "1231323123",
  "landline": "",
  "member_id": ""
});

/** tbl_location records **/
db.getCollection("tbl_location").insert({
  "_id": ObjectId("50dc6ccd6803fa1130000000"),
  "name": "Hà Nội",
  "type_location": "tinh_thanh",
  "root": NumberInt(0)
});
db.getCollection("tbl_location").insert({
  "_id": ObjectId("50dc6cce6803fa1130000001"),
  "name": "Đà Nẵng",
  "type_location": "tinh_thanh",
  "root": NumberInt(0)
});
db.getCollection("tbl_location").insert({
  "_id": ObjectId("50dc6cce6803fa1130000002"),
  "name": "Hồ Chí Minh",
  "type_location": "tinh_thanh",
  "root": NumberInt(0)
});

/** tbl_member records **/
db.getCollection("tbl_member").insert({
  "_id": ObjectId("50dc7f566803fa3548000000"),
  "id": null,
  "email": "aa@gmail.com",
  "password": "89235a5c7afee61a8e03161ce64db1edcf0ec8dc",
  "type_member": "",
  "create_date": NumberInt(0),
  "re_password": "111111",
  "verifyCode": ""
});
db.getCollection("tbl_member").insert({
  "_id": ObjectId("50dcef006803fa9a11000000"),
  "email": "mrphu30741@gmail.com",
  "password": "89235a5c7afee61a8e03161ce64db1edcf0ec8dc",
  "type_member": "customer",
  "create_date": NumberInt(0)
});
db.getCollection("tbl_member").insert({
  "_id": ObjectId("50ddc9c76803fafc0b000000"),
  "email": "dfdsf@gdd.com",
  "password": "89235a5c7afee61a8e03161ce64db1edcf0ec8dc",
  "type_member": "customer",
  "create_date": NumberInt(0)
});
db.getCollection("tbl_member").insert({
  "_id": ObjectId("50ddd04e6803fa0e27000000"),
  "email": "mrphu30742@gmail.com",
  "password": "89235a5c7afee61a8e03161ce64db1edcf0ec8dc",
  "type_member": "store",
  "create_date": NumberInt(1356714062)
});
db.getCollection("tbl_member").insert({
  "_id": ObjectId("50ddd0676803fa0d27000000"),
  "create_date": NumberLong(1356714087),
  "email": "mrphu307421@gmail.com",
  "password": "89235a5c7afee61a8e03161ce64db1edcf0ec8dc",
  "type_member": "admin"
});

/** tbl_store records **/
db.getCollection("tbl_store").insert({
  "_id": ObjectId("50ddd0676803fa0d27000001"),
  "store_name": "êrrr",
  "company_name": "ádasd334324",
  "website": "http:\/\/dsds.com",
  "email": "mrphu307421@gmail.com",
  "mobile": "435435435435",
  "landline": "",
  "address": "dfdsf dsfsd fsdf45435",
  "location_id": "50dc6ccd6803fa1130000000",
  "image": "",
  "authentication": "",
  "member_id": "",
  "type_store": "",
  "created_date": NumberInt(1356714087)
});

/** tbl_subscriber records **/
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc7bdc6803fa7a40000001"),
  "id": null,
  "email": "aa@gmail.com",
  "member_id": "50dc7bdb6803fa7a40000000",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc7d986803fa853c000001"),
  "id": null,
  "email": "aa@gmail.com",
  "member_id": "50dc7d986803fa853c000000",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc7e446803fae747000001"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc7e436803fae747000000",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc7f566803fa3548000001"),
  "id": null,
  "email": "aa@gmail.com",
  "member_id": "50dc7f566803fa3548000000",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc7f936803fae747000004"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc7f936803fae747000003",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc7f9a6803fa3548000004"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc7f9a6803fa3548000003",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc7fa56803fa8e43000001"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc7fa56803fa8e43000000",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc7fb46803fa354b000001"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc7fb46803fa354b000000",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc7fc46803fa5f4a000001"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc7fc36803fa5f4a000000",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc7fc86803fa5f4a000003"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc7fc86803fa5f4a000002",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc80006803fae747000006"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc80006803fae747000005",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc80086803fa5746000001"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc80086803fa5746000000",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc80986803fa3548000006"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc80986803fa3548000005",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc80ba6803fa5746000003"),
  "id": null,
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc80b96803fa5746000002",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50dc816d6803fa784b000001"),
  "email": "mrphu3074@gmail.com",
  "member_id": "50dc816d6803fa784b000000",
  "active": true
});
db.getCollection("tbl_subscriber").insert({
  "_id": ObjectId("50ddc9c76803fafc0b000001"),
  "email": "",
  "member_id": "50ddc9c76803fafc0b000000",
  "active": true
});
